﻿using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.PresentationML.Presentation.SlideElements
{
    [XmlRoot("sndAction", Namespace = Constants.Presentation)]
    public class SoundAction : XmlSerializable
    {
        [XmlElement("", Namespace = Constants.Presentation)]
        public ISoundAction Action { get; set; }

        public SoundAction() { }
    }

    [XmlRoot("stSnd", Namespace = Constants.Presentation)]
    public class StartSoundAction : XmlSerializable, ISoundAction
    {
        [Optional]
        [XmlAttribute("loop", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> Loop { get; set; }

        [XmlElement("snd", Namespace = Constants.Presentation)]
        public Sound Sound { get; set; }

        public StartSoundAction() { }
    }

    [XmlRoot("endSnd", Namespace = Constants.Presentation)]
    public class EndSoundAction : XmlSerializable, ISoundAction
    {
        public EndSoundAction() { }
    }
}
